﻿<phone:PhoneApplicationPage 
    x:Class="BiHCurrencyConverter.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=LocalizedResources.AppTitle_Text, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=LocalizedResources.PgMainTitle_Text, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <ScrollViewer x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" VerticalScrollBarVisibility="Auto">
            <Grid VerticalAlignment="Center">
                <TextBlock Margin="0,0,12,418" Style="{StaticResource PhoneTextSubtleStyle}" HorizontalAlignment="Right" Text="{Binding Path=LocalizedResources.txtAmount, Source={StaticResource LocalizedStrings}}" ></TextBlock>
                <TextBox Height="92" HorizontalAlignment="Right" Margin="0,22,0,0" Name="tbSrcValue"  Text="100.00" VerticalAlignment="Top" Width="303" InputScope="Number" TextAlignment="Right" FontSize="40" GotFocus="tbSrcValue_GotFocus" FontWeight="Medium"></TextBox>
                <toolkit:ListPicker ItemsSource="{Binding}" Header="{Binding Path=LocalizedResources.txtCurrency, Source={StaticResource LocalizedStrings}}" FullModeHeader="{Binding Path=LocalizedResources.txtSrcCurrency, Source={StaticResource LocalizedStrings}}" CacheMode="BitmapCache" Margin="12,17,0,401" Name="lpSource" Loaded="lpSource_Loaded" HorizontalAlignment="Left" Width="120">
                    <toolkit:ListPicker.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="24" Height="24" Source="{Binding ImageUrl}" />
                                <TextBlock Text="{Binding Symbol}" Margin="12 0 0 0"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker.ItemTemplate>
                    <toolkit:ListPicker.FullModeItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="16 21 0 20">
                                <Image Width="43" Height="43" Source="{Binding ImageUrl}" />
                                <TextBlock Text="{Binding Symbol}" Margin="16 0 0 0" FontSize="43" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker.FullModeItemTemplate>

                </toolkit:ListPicker>

                <toolkit:ListPicker ItemsSource="{Binding}" Header="{Binding Path=LocalizedResources.txtConvertTo, Source={StaticResource LocalizedStrings}}" FullModeHeader="{Binding Path=LocalizedResources.txtResCurrency, Source={StaticResource LocalizedStrings}}" CacheMode="BitmapCache" Margin="12,138,0,295"  Name="lpResulting" Loaded="lpResulting_Loaded" HorizontalAlignment="Left" Width="120">
                    <toolkit:ListPicker.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <Image Width="24" Height="24" Source="{Binding ImageUrl}" />
                                <TextBlock Text="{Binding Symbol}" Margin="12 0 0 0"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker.ItemTemplate>
                    <toolkit:ListPicker.FullModeItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="16 21 0 20">
                                <Image Width="43" Height="43" Source="{Binding ImageUrl}" />
                                <TextBlock Text="{Binding Symbol}" Margin="16 0 0 0" FontSize="43" FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker.FullModeItemTemplate>

                </toolkit:ListPicker>
                <TextBlock Height="80" HorizontalAlignment="Right" Name="tbResult" Text="" VerticalAlignment="Bottom" Width="432" TextAlignment="Right" FontSize="60" Margin="0,0,15,212" />
            </Grid>
        </ScrollViewer>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.5">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.check.rest.png" Text="convert" Click="ApplicationBarIconButton_Click"  />
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.swap2-1.rest.png" Text="swap" Click="ApplicationBarIconButton_Click_1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.feature.email.rest.png" Text="message" Click="ApplicationBarIconButton_Click_2" />
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="settings" Click="ApplicationBarMenuItem_Click"/>
                <shell:ApplicationBarMenuItem Text="about" Click="ApplicationBarMenuItem_Click_1"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>